#define  _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
#include <string.h>
int main()
{
	char a[80] = { 0 };
	int i = 0, n = 0;
	scanf("%d", &n);
	int	longest = 0;
	int l = 0;
	char x[80] = { 0 };
	for (i = 0; i < n; i++)
	{
		scanf("%s", &a);
		l = strlen(a);
		if (l > longest)
		{
			longest = l;
			strcpy(x, a);
		}
	}
	
	printf("The longest is: %s", x);

	return 0;
}